<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div class="shop_hd_menu">
    <!-- 所有商品菜单 -->
    <div id="shop_hd_menu_all_category" class="shop_hd_menu_all_category">
        <!-- 首页去掉 id="shop_hd_menu_all_category" 加上clsss shop_hd_menu_hover -->
        <div class="shop_hd_menu_all_category_title">
            <h2 title="所有商品分类">
                <a href="javascript:void(0);">所有商品分类</a>
            </h2>
            <i></i>
        </div>
        <div id="shop_hd_menu_all_category_hd" class="shop_hd_menu_all_category_hd">
            <ul class="shop_hd_menu_all_category_hd_menu clearfix">
                <!-- 单个菜单项 -->
                <c:forEach items="${categoryByAll}" var="categoryByZero">
                    <c:if test="${categoryByZero.parent_id==1}">
                        <li id="cat_1" class="">
                            <h3>
                                <a href="javascript:void(0);" title="${categoryByZero.name}">${categoryByZero.name!=null?categoryByZero.name:"没有名字哦!"}</a>
                            </h3>
                            <div class="cat_menu clearfix" style="">
                                <dl class="clearfix category_dl">
                                    <c:forEach items="${categoryByAll}" varStatus="status" var="categoriesOne">
                                        <c:if test="${categoriesOne.parent_id==categoryByZero.id}">
                                            <dt>
<%--                                                onclick="postBody('/render/product/list?parent_id=${categoriesOne.parent_id}&id=${categoriesOne.id}&pc=1&key=2');"--%>
                                                <a href="javascript:void(0);">
                                                    ${categoriesOne.name!=null?categoriesOne.name:"没有名字哦!"}
                                                </a>
                                            </dt>
                                            <dd>
                                                <c:forEach items="${categoryByAll}" var="categoriesTwo">
                                                    <c:if test="${categoriesTwo.parent_id==categoriesOne.id}">
                                                        <a href="/render/product/list?parent_id=${categoriesTwo.parent_id}&id=${categoriesTwo.id}&pc=1&key=2">
                                                            ${categoriesTwo.name!=null?categoriesTwo.name:"没有名字哦!"}
                                                        </a>
                                                    </c:if>
                                                </c:forEach>
                                            </dd>
                                        </c:if>
                                    </c:forEach>
                                </dl>
                            </div>
                        </li>
                    </c:if>
                </c:forEach>
                <!-- 单个菜单项 End -->
                <%--<li class="more">
                    <a href="javascript:void(0);">查看更多分类</a>
                </li>--%>
            </ul>
        </div>
    </div>
    <!-- 所有商品菜单 END -->

    <!-- 普通导航菜单 -->
    <ul class="shop_hd_menu_nav">
        <li class="current_link"><a href="/"><span>首页</span></a></li>
        <%--<li class="link"><a href="javascript:void(0);"><span>团购</span></a></li>
        <li class="link"><a href="javascript:void(0);"><span>品牌</span></a></li>
        <li class="link"><a href="javascript:void(0);"><span>优惠卷</span></a></li>
        <li class="link"><a href="javascript:void(0);"><span>积分中心</span></a></li>
        <li class="link"><a href="javascript:void(0);"><span>运动专场</span></a></li>
        <li class="link"><a href="javascript:void(0);"><span>微商城</span></a></li>--%>
    </ul>
    <!-- 普通导航菜单 End -->
</div>
<div class="clear"></div>
<script type="text/javascript">
    function postBody(s) {
        $.ajax({
            url: s,
            type: "get",
            success: function (data) {
                $(".my_body").empty();
                $(".my_body").html(data);
            }
        });
    }
</script>
